package com.ruoyi.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Created by XiaoYi  on 2020-01-16 17:26
 * 乐树
 */
@Component
@ConfigurationProperties(prefix = "ls")
public class YfGlobal {

    //注意 set方法不要使用static 不然无法获取值


    private static String key;
    private static String profile;
    private static String password;

    private static String imgPath;
    private static String apkPath;
    private static String logoPath;

    public static String getKey() {
        return key;
    }

    public void setKey(String key) {
        YfGlobal.key = key;
    }

    public static String getProfile() {
        return profile;
    }

    public void setProfile(String profile) {
        YfGlobal.profile = profile;
    }


    public static String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        YfGlobal.password = password;
    }

    public static String getImgPath() {
        return imgPath;
    }

    public void setImgPath(String imgPath) {
        YfGlobal.imgPath = imgPath;
    }

    public static String getApkPath() {
        return apkPath;
    }

    public void setApkPath(String apkPath) {
        YfGlobal.apkPath = apkPath;
    }

    public static String getLogoPath() {
        System.out.println("logoPath>>>" + logoPath);
        return logoPath;
    }

    public void setLogoPath(String logoPath) {
        YfGlobal.logoPath = logoPath;
    }

    public enum Path {
        img(imgPath), apk(apkPath), logo(logoPath);
        private final String value;

        Path(String str) {
            this.value = "/" + str;
        }

        public String getValue() {
            return this.value;
        }
    }


}